package org.jeecg.modules.param.area.entity;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.formula.functions.T;
import org.jeecg.modules.param.area.dto.BikeSysAreaTree;
import org.jeecg.modules.param.area.entity.BikeSysUserArea;
import org.jeecg.modules.param.station.entity.BikeStation;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: bike_sys_area
 * @Author: 月月鸟
 * @Date:   2021-05-18
 * @Version: V1.0
 */
@Data
@TableName("bike_sys_area")
@ApiModel(value="区域对象", description="区域对象")
public class BikeSysArea implements Serializable , Cloneable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	/**业务编码(如省码)*/
	@Excel(name = "区域编码*", width = 15)
    @ApiModelProperty(value = "区域编号*")
    private java.lang.String areaCode;
    /**区域名称*/
    @Excel(name = "区域名称*", width = 15)
    @ApiModelProperty(value = "区域名称*")
    private java.lang.String name;
	/**上级区域主键*/
	@Excel(name = "上级区域编号", width = 15,dicCode = "id",dictTable = "bike_sys_area",dicText = "area_code")
    @ApiModelProperty(value = "上级区域主键")
    private java.lang.String parentId;
    /**上级区域名称*/
    @Excel(name = "上级区域名称", width = 15)
    @ApiModelProperty(value = "上级区域名称")
    @TableField(exist = false)
    private java.lang.String parenName;
	/**启用状态(1启用0禁用)*/
	@Excel(name = "启用状态*(启用/禁用)", width = 15, dicCode = "mode_type")
	@Dict(dicCode = "mode_type")
    @ApiModelProperty(value = "启用状态(1启用0禁用)")
    private java.lang.String status;
    /**创建时间*/
    //@Excel(name = "创建时间",width = 15,format = "yyyy-MM-dd HH:mm:ss",databaseFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private java.util.Date createTime;


    /**区域类型(1市, 2区, 3镇, 4街道)*/
    @ApiModelProperty(value = "区域类型(1市, 2区, 3镇, 4街道)")
    @TableField(exist = false)
    private java.lang.String type;
	/**长编码以下划线区分*/
    @ApiModelProperty(value = "长编码以下划线区分")
    @TableField(exist = false)
    private java.lang.String longCode;
	/**长名称以下划线区分*/
    @ApiModelProperty(value = "长名称以下划线区分")
    @TableField(exist = false)
    private java.lang.String longName;
	/**是否有子节点*/
	@Excel(name = "是否有子节点", width = 0)
    @ApiModelProperty(value = "是否有子节点")
    private java.lang.String hasChild;
	/**层级(1、2、3、4、5)*/
    @ApiModelProperty(value = "层级(1、2、3、4、5)")
    @TableField(exist = false)
    private java.lang.String grade;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**修改人*/
    @ApiModelProperty(value = "修改人")
    private java.lang.String updateBy;
	/**修改时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private java.util.Date updateTime;
	/**备注*/
    @TableField(exist = false)
    @ApiModelProperty(value = "备注")
    private java.lang.String memo;
	/**父级节点*/
    @TableField(exist = false)
    @ApiModelProperty(value = "父级节点")
    private java.lang.String pid;



	@TableField(exist = false)
    @ApiModelProperty(value = "用户区域权限")
    private BikeSysUserArea bikeSysUserArea;
	@TableField(exist = false)
    @ApiModelProperty(value = "子级")
    private List<BikeSysArea> children;

    @Override
    public BikeSysArea clone(){
        BikeSysArea sysArea = null;
        try {
            sysArea = (BikeSysArea)super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return sysArea;
    }
}
